﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using Model;
using Utility;
namespace Service
{
    /// <summary>
    /// 功能：Report_TB_Age类数据访问
    /// 创建人：Wilson
    /// 创建时间：2013-1-30   
    /// </summary>
    public class Report_TB_AgeService : IDisposable
    {
        #region 公共
        private System.ComponentModel.Component component = new System.ComponentModel.Component();

        private bool disposed = false;

        ~Report_TB_AgeService()
        {
            Dispose(false);
        }

        #endregion

        #region IDisposable 成员

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        private void Dispose(bool disposing)
        {
            if (!this.disposed)
            {

                if (disposing)
                {

                    component.Dispose();
                }

                disposed = true;

            }
        }
        #endregion
		#region##MapperReport_TB_Age
        public IList<Report_TB_Age> MapperList(SqlDataReader reader)
         {
            IList<Report_TB_Age> list = new List<Report_TB_Age>();
            Report_TB_Age obj=null;
            while (reader.Read())
            {
                obj = new Report_TB_Age();
                obj.GuId3 = (decimal)reader["GuId3"];
                obj.RID = (string)reader["RID"];
                obj.TJND4 = (string)reader["TJND4"];
                obj.AGE3 = (string)reader["AGE3"];
                obj.XB = (string)reader["XB"];
                obj.CityId = (string)reader["CityId"];
                obj.DISTRICTID = (string)reader["DISTRICTID"];
                obj.SCHOOLBH = (string)reader["SCHOOLBH"];
                obj.SchoolType = reader["SchoolType"] as string;
                obj.XS = reader["XS"] as int?;
                obj.SJ = reader["SJ"] as int?;
                obj.H1 = reader["H1"] as int?;
                obj.H1B = reader["H1B"] as decimal?;
                obj.H2 = reader["H2"] as int?;
                obj.H2B = reader["H2B"] as decimal?;
                obj.H3 = reader["H3"] as int?;
                obj.H3B = reader["H3B"] as decimal?;
                obj.H4 = reader["H4"] as int?;
                obj.H4B = reader["H4B"] as decimal?;
                obj.H5 = reader["H5"] as int?;
                obj.H5B = reader["H5B"] as decimal?;
                obj.H6 = reader["H6"] as int?;
                obj.H6B = reader["H6B"] as decimal?;
                obj.H7 = reader["H7"] as int?;
                obj.H7B = reader["H7B"] as decimal?;
                obj.H8 = reader["H8"] as int?;
                obj.H8B = reader["H8B"] as decimal?;
                obj.H9 = reader["H9"] as int?;
                obj.H9B = reader["H9B"] as decimal?;
                obj.H10 = reader["H10"] as int?;
                obj.H10B = reader["H10B"] as decimal?;
                obj.H11 = reader["H11"] as int?;
                obj.H11B = reader["H11B"] as decimal?;
                obj.H12 = reader["H12"] as int?;
                obj.H12B = reader["H12B"] as decimal?;
                obj.H13 = reader["H13"] as int?;
                obj.H13B = reader["H13B"] as decimal?;
                obj.H14 = reader["H14"] as int?;
                obj.H14B = reader["H14B"] as decimal?;
                obj.H15 = reader["H15"] as int?;
                obj.H15B = reader["H15B"] as decimal?;
                obj.H16 = reader["H16"] as int?;
                obj.H16B = reader["H16B"] as decimal?;
                obj.H17 = reader["H17"] as int?;
                obj.H17B = reader["H17B"] as decimal?;
                obj.H18 = reader["H18"] as int?;
                obj.H18B = reader["H18B"] as decimal?;
                obj.H19 = reader["H19"] as int?;
                obj.H19B = reader["H19B"] as decimal?;
                obj.H20 = reader["H20"] as int?;
                obj.H20B = reader["H20B"] as decimal?;
                list.Add(obj);
            }
            return list;
         }
        public Report_TB_Age Mapper(SqlDataReader reader)
         {
            Report_TB_Age obj=null;
            if (reader.Read())
            {
                obj = new Report_TB_Age();
                obj.GuId3 = (decimal)reader["GuId3"];
                obj.RID = (string)reader["RID"];
                obj.TJND4 = (string)reader["TJND4"];
                obj.AGE3 = (string)reader["AGE3"];
                obj.XB = (string)reader["XB"];
                obj.CityId = (string)reader["CityId"];
                obj.DISTRICTID = (string)reader["DISTRICTID"];
                obj.SCHOOLBH = (string)reader["SCHOOLBH"];
                obj.SchoolType = reader["SchoolType"] as string;
                    obj.XS = reader["XS"] as int?;
                    obj.SJ = reader["SJ"] as int?;
                    obj.H1 = reader["H1"] as int?;
                    obj.H1B = reader["H1B"] as decimal?;
                    obj.H2 = reader["H2"] as int?;
                    obj.H2B = reader["H2B"] as decimal?;
                    obj.H3 = reader["H3"] as int?;
                    obj.H3B = reader["H3B"] as decimal?;
                    obj.H4 = reader["H4"] as int?;
                    obj.H4B = reader["H4B"] as decimal?;
                    obj.H5 = reader["H5"] as int?;
                    obj.H5B = reader["H5B"] as decimal?;
                    obj.H6 = reader["H6"] as int?;
                    obj.H6B = reader["H6B"] as decimal?;
                    obj.H7 = reader["H7"] as int?;
                    obj.H7B = reader["H7B"] as decimal?;
                    obj.H8 = reader["H8"] as int?;
                    obj.H8B = reader["H8B"] as decimal?;
                    obj.H9 = reader["H9"] as int?;
                    obj.H9B = reader["H9B"] as decimal?;
                    obj.H10 = reader["H10"] as int?;
                    obj.H10B = reader["H10B"] as decimal?;
                    obj.H11 = reader["H11"] as int?;
                    obj.H11B = reader["H11B"] as decimal?;
                    obj.H12 = reader["H12"] as int?;
                    obj.H12B = reader["H12B"] as decimal?;
                    obj.H13 = reader["H13"] as int?;
                    obj.H13B = reader["H13B"] as decimal?;
                    obj.H14 = reader["H14"] as int?;
                    obj.H14B = reader["H14B"] as decimal?;
                    obj.H15 = reader["H15"] as int?;
                    obj.H15B = reader["H15B"] as decimal?;
                    obj.H16 = reader["H16"] as int?;
                    obj.H16B = reader["H16B"] as decimal?;
                    obj.H17 = reader["H17"] as int?;
                    obj.H17B = reader["H17B"] as decimal?;
                    obj.H18 = reader["H18"] as int?;
                    obj.H18B = reader["H18B"] as decimal?;
                    obj.H19 = reader["H19"] as int?;
                    obj.H19B = reader["H19B"] as decimal?;
                    obj.H20 = reader["H20"] as int?;
                    obj.H20B = reader["H20B"] as decimal?;
            }
            return obj;
         }
        #endregion
        #region##通过主键ID得到Report_TB_Age
        /// <summary>
        /// 功能：通过ID得到Report_TB_Age
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-30   
        /// </summary>
        /// <param name="">主键ID</param>
        /// <returns></returns>
        public Report_TB_Age GetById(decimal guid3)
        {            
            string sql = "select * from Report_TB_Age where GuId3 = @PK";
            SqlParameter[] sp = new SqlParameter[]
            {
                new SqlParameter("@PK",9)
            };
            
            SqlDataReader reader=SqlHelper.ExecuteReader(WebConn.connString,CommandType.Text,sql,sp);
            return Mapper(reader);
        }
        #endregion
		
		#region##通过主键ID删除Report_TB_Age
        /// <summary>
        /// 功能：通过主键ID删除Report_TB_Age
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-30   
        /// </summary>
        /// <param name="">主键ID</param>
        /// <returns></returns>
		public int DeleteById(decimal guid3)
		{
			int i = 0;
			string sql = "delete from Report_TB_Age where GuId3 = @PK";
            SqlParameter[] sp = new SqlParameter[]
            {
                new SqlParameter("@PK",9)
            };
            i= SqlHelper.ExecuteNonQuery(WebConn.connString,CommandType.Text,sql,sp);
			return i;
		}
        /// <summary>
        /// 功能：通过主键ID删除Report_TB_Age
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-30   
        /// </summary>
        /// <param name="">主键ID</param>
        /// <returns></returns>
		public int DeleteById(SqlTransaction transaction,decimal guid3)
		{
			int i = 0;
			string sql = "delete from Report_TB_Age where GuId3 = @PK";
            SqlParameter[] sp = new SqlParameter[]
            {
                new SqlParameter("@PK",9)
            };
            i= SqlHelper.ExecuteNonQuery(transaction,CommandType.Text,sql,sp);
			return i;
		}
		#endregion			
		
        #region##添加Report_TB_Age
        /// <summary>
        /// 功能：添加Report_TB_Age
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-30
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        public int Add(Report_TB_Age report_tb_age)
        {
            int result = 0;
            string sql = "insert into Report_TB_Age(GuId3,RID,TJND4,AGE3,XB,CityId,DISTRICTID,SCHOOLBH,SchoolType,XS,SJ,H1,H1B,H2,H2B,H3,H3B,H4,H4B,H5,H5B,H6,H6B,H7,H7B,H8,H8B,H9,H9B,H10,H10B,H11,H11B,H12,H12B,H13,H13B,H14,H14B,H15,H15B,H16,H16B,H17,H17B,H18,H18B,H19,H19B,H20,H20B) values(@GuId3,@RID,@TJND4,@AGE3,@XB,@CityId,@DISTRICTID,@SCHOOLBH,@SchoolType,@XS,@SJ,@H1,@H1B,@H2,@H2B,@H3,@H3B,@H4,@H4B,@H5,@H5B,@H6,@H6B,@H7,@H7B,@H8,@H8B,@H9,@H9B,@H10,@H10B,@H11,@H11B,@H12,@H12B,@H13,@H13B,@H14,@H14B,@H15,@H15B,@H16,@H16B,@H17,@H17B,@H18,@H18B,@H19,@H19B,@H20,@H20B)";			
            SqlParameter[] sp = new SqlParameter[]
            {
				new SqlParameter("@GuId3",report_tb_age.GuId3),
				new SqlParameter("@RID",report_tb_age.RID),
				new SqlParameter("@TJND4",report_tb_age.TJND4),
				new SqlParameter("@AGE3",report_tb_age.AGE3),
				new SqlParameter("@XB",report_tb_age.XB),
				new SqlParameter("@CityId",report_tb_age.CityId),
				new SqlParameter("@DISTRICTID",report_tb_age.DISTRICTID),
				new SqlParameter("@SCHOOLBH",report_tb_age.SCHOOLBH),
				new SqlParameter("@SchoolType",report_tb_age.SchoolType),
				new SqlParameter("@XS",report_tb_age.XS),
				new SqlParameter("@SJ",report_tb_age.SJ),
				new SqlParameter("@H1",report_tb_age.H1),
				new SqlParameter("@H1B",report_tb_age.H1B),
				new SqlParameter("@H2",report_tb_age.H2),
				new SqlParameter("@H2B",report_tb_age.H2B),
				new SqlParameter("@H3",report_tb_age.H3),
				new SqlParameter("@H3B",report_tb_age.H3B),
				new SqlParameter("@H4",report_tb_age.H4),
				new SqlParameter("@H4B",report_tb_age.H4B),
				new SqlParameter("@H5",report_tb_age.H5),
				new SqlParameter("@H5B",report_tb_age.H5B),
				new SqlParameter("@H6",report_tb_age.H6),
				new SqlParameter("@H6B",report_tb_age.H6B),
				new SqlParameter("@H7",report_tb_age.H7),
				new SqlParameter("@H7B",report_tb_age.H7B),
				new SqlParameter("@H8",report_tb_age.H8),
				new SqlParameter("@H8B",report_tb_age.H8B),
				new SqlParameter("@H9",report_tb_age.H9),
				new SqlParameter("@H9B",report_tb_age.H9B),
				new SqlParameter("@H10",report_tb_age.H10),
				new SqlParameter("@H10B",report_tb_age.H10B),
				new SqlParameter("@H11",report_tb_age.H11),
				new SqlParameter("@H11B",report_tb_age.H11B),
				new SqlParameter("@H12",report_tb_age.H12),
				new SqlParameter("@H12B",report_tb_age.H12B),
				new SqlParameter("@H13",report_tb_age.H13),
				new SqlParameter("@H13B",report_tb_age.H13B),
				new SqlParameter("@H14",report_tb_age.H14),
				new SqlParameter("@H14B",report_tb_age.H14B),
				new SqlParameter("@H15",report_tb_age.H15),
				new SqlParameter("@H15B",report_tb_age.H15B),
				new SqlParameter("@H16",report_tb_age.H16),
				new SqlParameter("@H16B",report_tb_age.H16B),
				new SqlParameter("@H17",report_tb_age.H17),
				new SqlParameter("@H17B",report_tb_age.H17B),
				new SqlParameter("@H18",report_tb_age.H18),
				new SqlParameter("@H18B",report_tb_age.H18B),
				new SqlParameter("@H19",report_tb_age.H19),
				new SqlParameter("@H19B",report_tb_age.H19B),
				new SqlParameter("@H20",report_tb_age.H20),
				new SqlParameter("@H20B",report_tb_age.H20B)
            };
            result = SqlHelper.ExecuteNonQuery(WebConn.connString,CommandType.Text,sql,sp);
            return result;
        }
         /// <summary>
        /// 功能：添加Report_TB_Age
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-30
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        public int Add(SqlTransaction transaction,Report_TB_Age report_tb_age)
        {
            int result = 0;
            string sql = "insert into Report_TB_Age(GuId3,RID,TJND4,AGE3,XB,CityId,DISTRICTID,SCHOOLBH,SchoolType,XS,SJ,H1,H1B,H2,H2B,H3,H3B,H4,H4B,H5,H5B,H6,H6B,H7,H7B,H8,H8B,H9,H9B,H10,H10B,H11,H11B,H12,H12B,H13,H13B,H14,H14B,H15,H15B,H16,H16B,H17,H17B,H18,H18B,H19,H19B,H20,H20B) values(@GuId3,@RID,@TJND4,@AGE3,@XB,@CityId,@DISTRICTID,@SCHOOLBH,@SchoolType,@XS,@SJ,@H1,@H1B,@H2,@H2B,@H3,@H3B,@H4,@H4B,@H5,@H5B,@H6,@H6B,@H7,@H7B,@H8,@H8B,@H9,@H9B,@H10,@H10B,@H11,@H11B,@H12,@H12B,@H13,@H13B,@H14,@H14B,@H15,@H15B,@H16,@H16B,@H17,@H17B,@H18,@H18B,@H19,@H19B,@H20,@H20B)";			
            SqlParameter[] sp = new SqlParameter[]
            {
				new SqlParameter("@GuId3",report_tb_age.GuId3),
				new SqlParameter("@RID",report_tb_age.RID),
				new SqlParameter("@TJND4",report_tb_age.TJND4),
				new SqlParameter("@AGE3",report_tb_age.AGE3),
				new SqlParameter("@XB",report_tb_age.XB),
				new SqlParameter("@CityId",report_tb_age.CityId),
				new SqlParameter("@DISTRICTID",report_tb_age.DISTRICTID),
				new SqlParameter("@SCHOOLBH",report_tb_age.SCHOOLBH),
				new SqlParameter("@SchoolType",report_tb_age.SchoolType),
				new SqlParameter("@XS",report_tb_age.XS),
				new SqlParameter("@SJ",report_tb_age.SJ),
				new SqlParameter("@H1",report_tb_age.H1),
				new SqlParameter("@H1B",report_tb_age.H1B),
				new SqlParameter("@H2",report_tb_age.H2),
				new SqlParameter("@H2B",report_tb_age.H2B),
				new SqlParameter("@H3",report_tb_age.H3),
				new SqlParameter("@H3B",report_tb_age.H3B),
				new SqlParameter("@H4",report_tb_age.H4),
				new SqlParameter("@H4B",report_tb_age.H4B),
				new SqlParameter("@H5",report_tb_age.H5),
				new SqlParameter("@H5B",report_tb_age.H5B),
				new SqlParameter("@H6",report_tb_age.H6),
				new SqlParameter("@H6B",report_tb_age.H6B),
				new SqlParameter("@H7",report_tb_age.H7),
				new SqlParameter("@H7B",report_tb_age.H7B),
				new SqlParameter("@H8",report_tb_age.H8),
				new SqlParameter("@H8B",report_tb_age.H8B),
				new SqlParameter("@H9",report_tb_age.H9),
				new SqlParameter("@H9B",report_tb_age.H9B),
				new SqlParameter("@H10",report_tb_age.H10),
				new SqlParameter("@H10B",report_tb_age.H10B),
				new SqlParameter("@H11",report_tb_age.H11),
				new SqlParameter("@H11B",report_tb_age.H11B),
				new SqlParameter("@H12",report_tb_age.H12),
				new SqlParameter("@H12B",report_tb_age.H12B),
				new SqlParameter("@H13",report_tb_age.H13),
				new SqlParameter("@H13B",report_tb_age.H13B),
				new SqlParameter("@H14",report_tb_age.H14),
				new SqlParameter("@H14B",report_tb_age.H14B),
				new SqlParameter("@H15",report_tb_age.H15),
				new SqlParameter("@H15B",report_tb_age.H15B),
				new SqlParameter("@H16",report_tb_age.H16),
				new SqlParameter("@H16B",report_tb_age.H16B),
				new SqlParameter("@H17",report_tb_age.H17),
				new SqlParameter("@H17B",report_tb_age.H17B),
				new SqlParameter("@H18",report_tb_age.H18),
				new SqlParameter("@H18B",report_tb_age.H18B),
				new SqlParameter("@H19",report_tb_age.H19),
				new SqlParameter("@H19B",report_tb_age.H19B),
				new SqlParameter("@H20",report_tb_age.H20),
				new SqlParameter("@H20B",report_tb_age.H20B)
            };
            result = SqlHelper.ExecuteNonQuery(transaction,CommandType.Text,sql,sp);
            return result;
        }
        #endregion
		
		#region##得到Report_TB_Age集合
		/// <summary>
        /// 功能：得到Report_TB_Age集合
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-30
        /// </summary>       
        /// <returns></returns>
		public IList<Report_TB_Age> GetList()
		{
			string sql = "select * from Report_TB_Age";			
			SqlDataReader reader = SqlHelper.ExecuteReader(WebConn.connString,CommandType.Text,sql);
            return MapperList(reader);
		}
		#endregion
		
		#region##修改Report_TB_Age
        /// <summary>
        /// 功能：修改Report_TB_Age
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-30
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        public int ModReport_TB_Age(Report_TB_Age report_tb_age)
        {
            int result = 0;
            string sql = "update Report_TB_Age set GuId3 = @GuId3,RID = @RID,TJND4 = @TJND4,AGE3 = @AGE3,XB = @XB,CityId = @CityId,DISTRICTID = @DISTRICTID,SCHOOLBH = @SCHOOLBH,SchoolType = @SchoolType,XS = @XS,SJ = @SJ,H1 = @H1,H1B = @H1B,H2 = @H2,H2B = @H2B,H3 = @H3,H3B = @H3B,H4 = @H4,H4B = @H4B,H5 = @H5,H5B = @H5B,H6 = @H6,H6B = @H6B,H7 = @H7,H7B = @H7B,H8 = @H8,H8B = @H8B,H9 = @H9,H9B = @H9B,H10 = @H10,H10B = @H10B,H11 = @H11,H11B = @H11B,H12 = @H12,H12B = @H12B,H13 = @H13,H13B = @H13B,H14 = @H14,H14B = @H14B,H15 = @H15,H15B = @H15B,H16 = @H16,H16B = @H16B,H17 = @H17,H17B = @H17B,H18 = @H18,H18B = @H18B,H19 = @H19,H19B = @H19B,H20 = @H20,H20B = @H20B where GuId3 = @GuId3";
            SqlParameter[] sp = new SqlParameter[]
            {       
				new SqlParameter("@GuId3",report_tb_age.GuId3),
				new SqlParameter("@RID",report_tb_age.RID),
				new SqlParameter("@TJND4",report_tb_age.TJND4),
				new SqlParameter("@AGE3",report_tb_age.AGE3),
				new SqlParameter("@XB",report_tb_age.XB),
				new SqlParameter("@CityId",report_tb_age.CityId),
				new SqlParameter("@DISTRICTID",report_tb_age.DISTRICTID),
				new SqlParameter("@SCHOOLBH",report_tb_age.SCHOOLBH),
				new SqlParameter("@SchoolType",report_tb_age.SchoolType),
				new SqlParameter("@XS",report_tb_age.XS),
				new SqlParameter("@SJ",report_tb_age.SJ),
				new SqlParameter("@H1",report_tb_age.H1),
				new SqlParameter("@H1B",report_tb_age.H1B),
				new SqlParameter("@H2",report_tb_age.H2),
				new SqlParameter("@H2B",report_tb_age.H2B),
				new SqlParameter("@H3",report_tb_age.H3),
				new SqlParameter("@H3B",report_tb_age.H3B),
				new SqlParameter("@H4",report_tb_age.H4),
				new SqlParameter("@H4B",report_tb_age.H4B),
				new SqlParameter("@H5",report_tb_age.H5),
				new SqlParameter("@H5B",report_tb_age.H5B),
				new SqlParameter("@H6",report_tb_age.H6),
				new SqlParameter("@H6B",report_tb_age.H6B),
				new SqlParameter("@H7",report_tb_age.H7),
				new SqlParameter("@H7B",report_tb_age.H7B),
				new SqlParameter("@H8",report_tb_age.H8),
				new SqlParameter("@H8B",report_tb_age.H8B),
				new SqlParameter("@H9",report_tb_age.H9),
				new SqlParameter("@H9B",report_tb_age.H9B),
				new SqlParameter("@H10",report_tb_age.H10),
				new SqlParameter("@H10B",report_tb_age.H10B),
				new SqlParameter("@H11",report_tb_age.H11),
				new SqlParameter("@H11B",report_tb_age.H11B),
				new SqlParameter("@H12",report_tb_age.H12),
				new SqlParameter("@H12B",report_tb_age.H12B),
				new SqlParameter("@H13",report_tb_age.H13),
				new SqlParameter("@H13B",report_tb_age.H13B),
				new SqlParameter("@H14",report_tb_age.H14),
				new SqlParameter("@H14B",report_tb_age.H14B),
				new SqlParameter("@H15",report_tb_age.H15),
				new SqlParameter("@H15B",report_tb_age.H15B),
				new SqlParameter("@H16",report_tb_age.H16),
				new SqlParameter("@H16B",report_tb_age.H16B),
				new SqlParameter("@H17",report_tb_age.H17),
				new SqlParameter("@H17B",report_tb_age.H17B),
				new SqlParameter("@H18",report_tb_age.H18),
				new SqlParameter("@H18B",report_tb_age.H18B),
				new SqlParameter("@H19",report_tb_age.H19),
				new SqlParameter("@H19B",report_tb_age.H19B),
				new SqlParameter("@H20",report_tb_age.H20),
				new SqlParameter("@H20B",report_tb_age.H20B)
            };
            result = SqlHelper.ExecuteNonQuery(WebConn.connString,CommandType.Text,sql,sp);
            return result;
        }
         /// <summary>
        /// 功能：修改Report_TB_Age
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-30
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        public int ModReport_TB_Age(SqlTransaction transaction,Report_TB_Age report_tb_age)
        {
            int result = 0;
            string sql = "update Report_TB_Age set GuId3 = @GuId3,RID = @RID,TJND4 = @TJND4,AGE3 = @AGE3,XB = @XB,CityId = @CityId,DISTRICTID = @DISTRICTID,SCHOOLBH = @SCHOOLBH,SchoolType = @SchoolType,XS = @XS,SJ = @SJ,H1 = @H1,H1B = @H1B,H2 = @H2,H2B = @H2B,H3 = @H3,H3B = @H3B,H4 = @H4,H4B = @H4B,H5 = @H5,H5B = @H5B,H6 = @H6,H6B = @H6B,H7 = @H7,H7B = @H7B,H8 = @H8,H8B = @H8B,H9 = @H9,H9B = @H9B,H10 = @H10,H10B = @H10B,H11 = @H11,H11B = @H11B,H12 = @H12,H12B = @H12B,H13 = @H13,H13B = @H13B,H14 = @H14,H14B = @H14B,H15 = @H15,H15B = @H15B,H16 = @H16,H16B = @H16B,H17 = @H17,H17B = @H17B,H18 = @H18,H18B = @H18B,H19 = @H19,H19B = @H19B,H20 = @H20,H20B = @H20B where GuId3 = @GuId3";
            SqlParameter[] sp = new SqlParameter[]
            {       
				new SqlParameter("@GuId3",report_tb_age.GuId3),
				new SqlParameter("@RID",report_tb_age.RID),
				new SqlParameter("@TJND4",report_tb_age.TJND4),
				new SqlParameter("@AGE3",report_tb_age.AGE3),
				new SqlParameter("@XB",report_tb_age.XB),
				new SqlParameter("@CityId",report_tb_age.CityId),
				new SqlParameter("@DISTRICTID",report_tb_age.DISTRICTID),
				new SqlParameter("@SCHOOLBH",report_tb_age.SCHOOLBH),
				new SqlParameter("@SchoolType",report_tb_age.SchoolType),
				new SqlParameter("@XS",report_tb_age.XS),
				new SqlParameter("@SJ",report_tb_age.SJ),
				new SqlParameter("@H1",report_tb_age.H1),
				new SqlParameter("@H1B",report_tb_age.H1B),
				new SqlParameter("@H2",report_tb_age.H2),
				new SqlParameter("@H2B",report_tb_age.H2B),
				new SqlParameter("@H3",report_tb_age.H3),
				new SqlParameter("@H3B",report_tb_age.H3B),
				new SqlParameter("@H4",report_tb_age.H4),
				new SqlParameter("@H4B",report_tb_age.H4B),
				new SqlParameter("@H5",report_tb_age.H5),
				new SqlParameter("@H5B",report_tb_age.H5B),
				new SqlParameter("@H6",report_tb_age.H6),
				new SqlParameter("@H6B",report_tb_age.H6B),
				new SqlParameter("@H7",report_tb_age.H7),
				new SqlParameter("@H7B",report_tb_age.H7B),
				new SqlParameter("@H8",report_tb_age.H8),
				new SqlParameter("@H8B",report_tb_age.H8B),
				new SqlParameter("@H9",report_tb_age.H9),
				new SqlParameter("@H9B",report_tb_age.H9B),
				new SqlParameter("@H10",report_tb_age.H10),
				new SqlParameter("@H10B",report_tb_age.H10B),
				new SqlParameter("@H11",report_tb_age.H11),
				new SqlParameter("@H11B",report_tb_age.H11B),
				new SqlParameter("@H12",report_tb_age.H12),
				new SqlParameter("@H12B",report_tb_age.H12B),
				new SqlParameter("@H13",report_tb_age.H13),
				new SqlParameter("@H13B",report_tb_age.H13B),
				new SqlParameter("@H14",report_tb_age.H14),
				new SqlParameter("@H14B",report_tb_age.H14B),
				new SqlParameter("@H15",report_tb_age.H15),
				new SqlParameter("@H15B",report_tb_age.H15B),
				new SqlParameter("@H16",report_tb_age.H16),
				new SqlParameter("@H16B",report_tb_age.H16B),
				new SqlParameter("@H17",report_tb_age.H17),
				new SqlParameter("@H17B",report_tb_age.H17B),
				new SqlParameter("@H18",report_tb_age.H18),
				new SqlParameter("@H18B",report_tb_age.H18B),
				new SqlParameter("@H19",report_tb_age.H19),
				new SqlParameter("@H19B",report_tb_age.H19B),
				new SqlParameter("@H20",report_tb_age.H20),
				new SqlParameter("@H20B",report_tb_age.H20B)
            };
            result = SqlHelper.ExecuteNonQuery(transaction,CommandType.Text,sql,sp);
            return result;
        }
        #endregion
		
		#region##统计Report_TB_Age
		/// <summary>
        /// 修改Report_TB_Age
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-30
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
		public int SelectCount()
		{
			int i = 0;
            string sql = "select count(*) from Report_TB_Age";
            i = (int)SqlHelper.ExecuteScalar(WebConn.connString,CommandType.Text,sql);
            return i;
		}
		/// <summary>
        /// 修改Report_TB_Age
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-30
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        public int SelectCountById()
        {
            int i=0;
            string sql="select count(GuId3) from Report_TB_Age";
            i = (int)SqlHelper.ExecuteScalar(WebConn.connString,CommandType.Text,sql);
            return i;
        }
		#endregion
        #region##自定义Report_TB_Age
        #endregion
                
    }
}
